<template>
<header>
	<div class="header">
		<div class="head">
			<div class="topBar">
				<router-link :to="{ 'name': 'Login'}">登陆</router-link>
				<router-link :to="{ 'name': 'Register'}">注册</router-link>
			</div>
			<a href="/" class="logo"></a>
		</div>
	</div>

	<div class="navigator">
		<div>
			<a href="/">首页</a>
			<span v-for="item in Config.nav" :key="item.channelIds">
				<!-- 新窗口打开 -->
				<a v-if="$route.path == '/'" target="_blank" :href="'#/list/'+item.channelIds">
					{{ item.title }}
	            </a>
				<a v-else :href="'#/list/'+item.channelIds">
	                {{ item.title }}
	            </a>
			</span>
		</div>
	</div>
</header>
</template>

<script>
import Util from '../libs/util'
import Config from '../libs/config'

export default {
	data() {
		return {
			Config: Config
		}
	},
	mounted: function() {
		// console.log(this.$route);
	},
}
</script>
